package org.findbugs.report.entity;

import org.dom4j.Document;
import org.dom4j.Node;
import org.findbugs.report.util.XPathExpressions;

public class Project {

    private String projectName;

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public static Project getProject(Document findbugsDocument) {
        Project project = new Project();
        Node projectNameNode = findbugsDocument.selectSingleNode(XPathExpressions.PROJECT + "/@projectName");
        project.setProjectName(projectNameNode.getText());
        return project;
    }

}
